<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>编辑角色</title>
<script type="text/javascript" src="$request.getContextPath()/resources/jquery/jquery-3.1.0.min.js"></script>

<link rel="stylesheet" type="text/css" href="$request.getContextPath()/resources/layui/css/layui.css">
<script type="text/javascript" src="$request.getContextPath()/resources/layui/layui.js"></script>
<script type="text/javascript" src="$request.getContextPath()/resources/layui/lay/modules/element.js"></script>

<link rel="stylesheet" href="$request.getContextPath()/resources/cws/system/role/edit.css"/>
<script type="text/javascript" src="$request.getContextPath()/resources/cws/system/role/edit.js"></script>
</head>
<body>
<form class="layui-form" action="">
  <input type="hidden" name="roleId" value="$!role.roleId">
  <div class="layui-form-item">
    <label class="layui-form-label">角色内码</label>
    <div class="layui-input-inline">
      <input type="text" name="roleCode" value="$!role.roleCode" required  lay-verify="required" placeholder="请输入角色内码" autocomplete="off" class="layui-input">
    </div>
    <div class="layui-form-mid layui-word-aux">角色内码标注角色唯一性</div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">角色名称</label>
    <div class="layui-input-inline">
      <input type="text" name="roleName" value="$!role.roleName"  required  lay-verify="realName" placeholder="请输入角色名称" autocomplete="off" class="layui-input">
    </div>
    <div class="layui-form-mid layui-word-aux">角色名称不可以重复</div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">角色类型</label>
    <div class="layui-input-inline">
      <select name="roleType" required lay-verify="required">
        #if($!role.roleType=='admin')
           <option value="admin" selected="selected">管理角色</option>
           <option value="user">普通角色</option>
        #else
           <option value="admin">管理角色</option>
           <option value="user" selected="selected">普通角色</option>
        #end
      </select>
    </div>
    <div class="layui-form-mid layui-word-aux">指定角色类型</div>
  </div>
  <div class="layui-form-item layui-form-text">
    <label class="layui-form-label">角色描述</label>
    <div class="layui-input-block">
      <textarea id="roleDesc" name="remark" placeholder="请输入角色描述" class="layui-textarea">$!role.remark</textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block submit-btn">
      <button class="layui-btn" lay-submit lay-filter="addRoleForm">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
</body>
</html>